/**
 * Node class is used to a node from a not script.
 * @author Lucas Venezian Povoa <lucasvenez at gmail dot com>
 */
function Node() {
	
	var label      = null;
	
	var attributes = new Array();
	
	this.setLabel = function(l) {
		label = l;
	};
	
	this.getLabel = function() {
		return label;
	};
	
	this.addAttribute = function(key, value) {
		attributes[key] = value;
	};
	
	this.hasAttribute = function(key) {
		return attributes[key] != undefined;
	};
	
	this.removeAttribute = function(key) {
		
		var result = attributes[key];
		
		if (result != undefined) {
			
			attributes[key] = undefined;
			return result;
		
		} else
			return null;
	};
	
	this.getAttribute = function(key) {
		
		var result = attributes[key];
		
		if (result != undefined)
			return result;
		else
			return null;
	};
};